package com.zzg.srb.core.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zzg.srb.core.entity.pojo.Borrower;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zzg.srb.core.entity.vo.BorrowerApprovalVo;
import com.zzg.srb.core.entity.vo.BorrowerAttachVo;
import com.zzg.srb.core.entity.vo.BorrowerDetailVo;
import com.zzg.srb.core.entity.vo.BorrowerVo;

import java.math.BigDecimal;

/**
 * <p>
 * 借款人 服务类
 * </p>
 *
 * @author zhengzg
 * @since 2022-05-27
 */
public interface BorrowerService extends IService<Borrower> {

    /**
     * 保存借款人信息
     * @param borrowerVo
     * @param userId
     */
    void saveBorrowerVoByUserId(BorrowerVo borrowerVo, Long userId);

    /**
     * 获取借款人状态
     * @param userId
     * @return
     */
    Integer getStatusByUserId(Long userId);

    /**
     * 借款人列表分页查询
     * @param pageParam
     * @param keyword
     * @return
     */
    IPage<Borrower> listPage(Page<Borrower> pageParam, String keyword);

    /**
     * 获取借款人信息列表
     * @param id
     * @return
     */
    BorrowerDetailVo getBorrowerDetailVoById(Long id);

    /**
     * 借款额度审批
     * @param borrowerApprovalVo
     */
    void approval(BorrowerApprovalVo borrowerApprovalVo);
}
